home *** CD-ROM | disk | FTP | other *** search
- global gbPC, gRootPath, gPicNo
-
- on mouseUp me
- setCursorWait()
- updateStage()
- fxObj = xtra("FileXtra3").new()
- if gbPC then
- dtPath = fxObj.fx_FolderGetSpecialPath("CSIDL_DESKTOPDIRECTORY")
- else
- dtPath = fxObj.fx_FolderGetSpecialPath("kDesktopFolderType")
- end if
- if dtPath = EMPTY then
- alert("Error finding desktop folder" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
- fxObj = 0
- exit
- end if
- DestFolder = dtPath & "Solaris"
- if not fxObj.fx_FolderExists("destFolder") then
- res = fxObj.fx_FolderCreate(DestFolder)
- if res = 0 then
- alert("Error creating folder on desktop" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
- fxObj = 0
- exit
- end if
- end if
- picFilename = member("filenames").line[gPicNo].word[1]
- destPath = DestFolder & picFilename
- if gbPC then
- SrcPath = gRootPath & "Photos\" & picFilename
- destPath = DestFolder & "\" & picFilename
- srcDoc = gRootPath & "Photos\Captions.doc"
- destDoc = DestFolder & "\Captions.doc"
- else
- SrcPath = gRootPath & "Photos:" & picFilename
- destPath = DestFolder & ":" & picFilename
- srcDoc = gRootPath & "Photos:Captions.doc"
- destDoc = DestFolder & ":Captions.doc"
- end if
- res = fxObj.fx_FileCopy(srcDoc, destDoc)
- if res = 0 then
- alert("Error copying file" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
- fxObj = 0
- exit
- end if
- res = fxObj.fx_FileCopy(SrcPath, destPath)
- if res = 0 then
- alert("Error copying file" & RETURN & "Error:" && fxObj.fx_ErrorNumber() & RETURN & fxObj.fx_ErrorString())
- fxObj = 0
- exit
- end if
- fxObj = 0
- setCursorStop()
- updateStage()
- alertObj = new(xtra("MUI"))
- alertInitList = [#Buttons: #Ok, #default: 1, #title: "Download", #Message: "Saved '" & picFilename & "' to Desktop ", #movable: 1]
- if objectp(alertObj) then
- result = alert(alertObj, alertInitList)
- end if
- end
-